package com.order.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.order.common.R;
import com.order.po.b_size;
import com.order.service.sizeService;
@Controller
public class sizeController {
	 @Autowired
	  private sizeService sizeService;
	 
	 @RequestMapping({"/getAllsize"})
	   @ResponseBody
	   public R getAllsize()
	   {
		 R r = R.ok().put("data", this.sizeService.getAllsize());
	     return r;
	   }
	 
	 @RequestMapping({"/get_bysizeid"})
	   @ResponseBody
	   public R get_bysizeid(String parameter)
	   {
		 R r = R.ok().put("data", this.sizeService.get_bysizeid(parameter));
	     return r;
	   }
	 

	   @RequestMapping({"/update_size"})
	   	@ResponseBody
	   public void update_size(b_size g)
	   {
	     this.sizeService.update_size(g);
	   }
	   
	   @RequestMapping({ "/delete_size" })
		@ResponseBody
		public void delete_size(String size_id) {
			this.sizeService.delete_size(size_id);
		 }	
	   
	   @RequestMapping({ "/insert_size" })
		@ResponseBody
		public R insert_size(b_size g) {
			return this.sizeService.insert_size(g);
		 }
}
